import { RouteRecordRaw } from "vue-router";
import Layout from '@/layout/Layout.vue'
// 404 on a page
export const PAGE_NOT_FOUND_ROUTE: RouteRecordRaw = {
  path: "/:path(.*)*",
  component: () => import("@/views/error/404.vue"),
  name: "NoFound",
  meta: {
    title: "404",
  },
};



// 静态路由表
const routes: Array<RouteRecordRaw> = [
  {
    // 路由重定向配置
    path: "/",
    name:"redirect",
    redirect: "/demo1",
  },
  {
    path: "/index",
    component: () => import("@/views/home/index.vue"),
    name: "index",
    meta: {
      title: "首页",
    },
  },
  {
    path: "/demo1",
    component: () => import("@/views/demo1/index.vue"),
    name: "demo1",
    meta: {
      title: "demo1",
    },
  },
];
const basicRouter=[...routes,PAGE_NOT_FOUND_ROUTE];
export default basicRouter;
